package demo09StackQueue;

import java.util.Stack;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:咭咭熊
 * Date:2021 - 10 - 18
 * Time:20:21
 */
public class TestStack {
    public static void main(String[] args) {
        Stack<Integer> stack = new Stack<>();
        stack.push(1);
        stack.push(2);
        stack.push(3);
        //拿到栈顶元素
        System.out.println(stack.peek());
        //弹出栈顶元素
        System.out.println(stack.pop());

    }
}
